package com.example.fly.pushdemo.smack;

import org.jivesoftware.smack.packet.Packet;

/**
 * Created by fly on 2017/6/6.
 */

public class MessageClient extends Packet {

    private String id;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    private String type;

    @Override
    public String toXML() {
        StringBuilder sb = new StringBuilder();
        sb.append("<");
        sb.append("iq");

        sb.append(" xmlns=\"jabber:client\"");
        sb.append(" to=\"ltb.cn \"");
        sb.append(" id=\"" + getId() + "\"");
        sb.append(" type=\"" + getType() + "\"");
        sb.append(">");

        sb.append("</");
        sb.append("iq");
        sb.append(">");
        return sb.toString();
    }
}
